+Thu Feb 26 21:52:58 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fixes for #12804 and #134722, Damon Chaplin:
+
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_start):
+ Ref and sink the cell renderers here.
+
+ * gtk/gtkcombobox.c (gtk_combo_box_finalize): Unref the cell
+ renderers here, and free attributes and func_data.
+
Thu Feb 26 21:41:38 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkrc.c (gtk_rc_reset_styles): Mark as 2.4 API addition.
+Thu Feb 26 21:52:58 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fixes for #12804 and #134722, Damon Chaplin:
+
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_start):
+ Ref and sink the cell renderers here.
+
+ * gtk/gtkcombobox.c (gtk_combo_box_finalize): Unref the cell
+ renderers here, and free attributes and func_data.
+
Thu Feb 26 21:41:38 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkrc.c (gtk_rc_reset_styles): Mark as 2.4 API addition.
+Thu Feb 26 21:52:58 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fixes for #12804 and #134722, Damon Chaplin:
+
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_start):
+ Ref and sink the cell renderers here.
+
+ * gtk/gtkcombobox.c (gtk_combo_box_finalize): Unref the cell
+ renderers here, and free attributes and func_data.
+
Thu Feb 26 21:41:38 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkrc.c (gtk_rc_reset_styles): Mark as 2.4 API addition.
+Thu Feb 26 21:52:58 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fixes for #12804 and #134722, Damon Chaplin:
+
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_start):
+ Ref and sink the cell renderers here.
+
+ * gtk/gtkcombobox.c (gtk_combo_box_finalize): Unref the cell
+ renderers here, and free attributes and func_data.
+
Thu Feb 26 21:41:38 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkrc.c (gtk_rc_reset_styles): Mark as 2.4 API addition.
+Thu Feb 26 21:52:58 2004 Matthias Clasen <maclas@gmx.de>
+
+ Fixes for #12804 and #134722, Damon Chaplin:
+
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_end):
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_start):
+ Ref and sink the cell renderers here.
+
+ * gtk/gtkcombobox.c (gtk_combo_box_finalize): Unref the cell
+ renderers here, and free attributes and func_data.
+
Thu Feb 26 21:41:38 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkrc.c (gtk_rc_reset_styles): Mark as 2.4 API addition.
combo_box = GTK_COMBO_BOX (layout);
+ g_object_ref (G_OBJECT (cell));
+ gtk_object_sink (GTK_OBJECT (cell));
+
info = g_new0 (ComboCellInfo, 1);
info->cell = cell;
info->expand = expand;
combo_box = GTK_COMBO_BOX (layout);
+ g_object_ref (G_OBJECT (cell));
+ gtk_object_sink (GTK_OBJECT (cell));
+
info = g_new0 (ComboCellInfo, 1);
info->cell = cell;
info->expand = expand;
gtk_combo_box_finalize (GObject *object)
{
GtkComboBox *combo_box = GTK_COMBO_BOX (object);
+ GSList *i;
gtk_combo_box_unset_model (combo_box);
if (combo_box->priv->model)
g_object_unref (combo_box->priv->model);
- g_slist_foreach (combo_box->priv->cells, (GFunc)g_free, NULL);
+ for (i = combo_box->priv->cells; i; i = i->next)
+ {
+ ComboCellInfo *info = (ComboCellInfo *)i->data;
+ GSList *list = info->attributes;
+
+ if (info->destroy)
+ info->destroy (info->func_data);
+
+ while (list && list->next)
+ {
+ g_free (list->data);
+ list = list->next->next;
+ }
+ g_slist_free (info->attributes);
+
+ g_object_unref (G_OBJECT (info->cell));
+ g_free (info);
+ }
g_slist_free (combo_box->priv->cells);
G_OBJECT_CLASS (parent_class)->finalize (object);